package com.mxx.common.http;

import okhttp3.MediaType;

import java.util.Map;

public class OkHttpTemplate implements HttpTemplate {
    @Override
    public HttpResponse doJson(String url, String content, Map<String, String> header) {
        return OKHttpUtil.doPost(url, content, header, OKHttpUtil.JSON_TYPE);
    }

    @Override
    public HttpResponse doForm(String url, Map<String, Object> fromBody, Map<String, String> header) {
        return OKHttpUtil.doPostForm(url, fromBody, header);
    }

    @Override
    public HttpResponse doGet(String url, Map<String, Object> queryParam, Map<String, String> header) {
        return OKHttpUtil.doGet(url, queryParam, header);
    }
}
